﻿{% extends 'index.html' %}
{% load i18n %}

{% block title %}{% trans "Signup" %}{% endblock %}

{%block head%}

<script type="text/javascript" > 

$(document).ready(function() { 
        
        $('#id_city').ready( function() {
        var _selected = $("#id_city").val(); 
        $.get('/test/'+_selected , function(data) {
        $('#id_team').append(data);
        $('#id_team').attr("disabled" , false)
    
       });
       
       });
       
        $('#id_city').change( function() {

           var _selected = $("#id_city").val(); 

           $.get('/test/'+_selected , function(data) {
            $('#id_team').html("");
                $('#id_team').append(data);
                $('#id_team').attr("disabled" , false)
            

            });

                       
                       
           
        });
 
              
    
  
});

              
        </script> 
  
     
            


{%endblock head%}
{% block center-col %}
<h3> سجل معنا  </h3>


<form class="ym-form" action="" method="post">
  {% csrf_token %}
    {% for field in form %}
    {{ field.errors }}
    {% comment %} Displaying checkboxes differently {% endcomment %}
    {% if field.name == 'tos' %}
    <p class="checkbox">
    <label for="id_{{ field.name }}">{{ field }} {{ field.label }}</label>
    </p>
    {% else %}
    <p>
    {{ field.label_tag }} 
    {{ field }}
    <small>         {{ field.help_text }} </small>

    </p>
    {% endif %}
    {% endfor %}

  <input type="submit" value = "تم ادخال البيانات " />
</form>
<br/>
{% endblock %}
